#ifndef LOS_H_
#define LOS_H_

#include "Solver.h"

#include <vector>
#include <string>
#include <fstream>
#include <iostream>
#include <assert.h>

namespace solvers {
class ProfileLOS : public ProfileSolver 
{
public:
	ProfileLOS();
	ProfileLOS(const ProfileLOS&);
	~ProfileLOS();

	virtual void readDataFromTextFile(const std::vector<std::string> files);
	virtual void readDataFromBinaryFile(const std::vector<std::string> files);
	virtual void readDataFromVariables(const int _size, const int _maxiter, const double _accuracy,
		int* _ig, int* _jg, double* _di, double* _gg,
		double* _pr);
	virtual void readDataFromVariables(const int _size, const int _maxiter, const double _accuracy,
		int* _ig, int* _jg, double* _di, double* _ggl, double* _ggu,
		double* _pr);

	virtual void printDataToTextFile(const std::vector<std::string> files) const;
	virtual void printDataToBinaryFile(const std::vector<std::string> files);

	virtual void FactorizationLLt();
	virtual void FactorizationLU1();
	virtual void FactorizationL1U(){}
	virtual void FactorizationLUsq(){}
	virtual void FactorizationLDLt(){}
	virtual void FactorizationLD1Lt(){}
	virtual void FactorizationLDU(){}

	virtual void SolveSLAU();
	virtual void SolveFacSLAU(){}
	virtual void SolveSLAU(const int _size, const int _maxiter, const double _accuracy,
		const int* _ig, const int* _jg, const double* _di, const double *_gg,
		const double* _pr, double* _solution){}
	virtual void SolverSLAU(const int _size, const int _maxiter, const double _accuracy,
		const int* _ig, const int* _jg, const double* _di, const double* _ggl, const double* _ggu,
		const double* _pr, double* _solution){}

	const int getCurrentIter() { return this->current_iter; }
protected:
	int current_iter;
};


class BlockLOS : public BlockSolver
{
public:
	BlockLOS();
	BlockLOS(const BlockLOS&);
	virtual ~BlockLOS();

	virtual void readDataFromTextFile(const std::vector<std::string> files);
	virtual void readDataFromBinaryFile(const std::vector<std::string> files);
	virtual void readDataFromVariables();

	virtual void printDataToTextFile(const std::vector<std::string> files) const;
	virtual void printDataFromBinaryFile(const std::vector<std::string> files) const;

	virtual void FactorizationLLt();
	virtual void FactorizationLU1();
	virtual void FactorizationL1U() {}
	virtual void FactorizationLUsq();
	virtual void FactorizationLDLt();
	virtual void FactorizationLD1Lt() {}
	virtual void FactorizationLDU() {}

	virtual void SloveSLAU();
	virtual void SloveFacSLAU();
	virtual void SloveSLAU(const int _size, const int _maxiter, const double _accuracy,
		const int* _ig, const int* _jg, const int* _idi, const int* _ijg, const double* _di,
		const double* _gg, const double* _pr, double* _solution);
	virtual void SolverSLAU(const int _size, const int _maxiter, const double _accuracy,
		const int* _ig, const int* _jg, const int* _idi, const int* _ijg, const double* _di, 
		const double* _ggl, const double* _ggu, const double* _pr, double* _solution);
protected:
};






}//end namespace

#endif